package com.house.entity;
import com.house.utils.Constant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLInsert;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

/**
 * @version 1.0
 * @Author OhygC
 * @since 1.0
 */
@Entity
@Table(name = "user")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
public class User extends CommonProperties{

    @ApiModelProperty(value = "用户名",dataType = "String",example = "测试")
    @Column(name = "username")
    private String username;

    @ApiModelProperty(value = "密码",dataType = "String",example = "123")
    @Column(name = "pass_word")
    private String password;

    @ApiModelProperty(value = "姓名",dataType = "String",example = "测试")
    @Column(name = "u_name")
    private String uname;

    @ApiModelProperty(value = "电话",dataType = "String",example = "19912341234")
    @Column(name = "phone")
    private String phone;

    @ApiModelProperty(value = "身份证",dataType = "String",example = "123456789123456789")
    @Column(name = "idcard")
    private String idcard;

    @ApiModelProperty(value = "角色",dataType = "String",required = true)
    @Column(name = "user_role")
    private String userRole;

    @ApiModelProperty(value = "状态",dataType = "String",required = true)
    @Column(name = "state")
    private Integer state;

    @ApiModelProperty(value = "盐",dataType = "String",required = true)
    @Column(name = "salt")
    private String salt;
}
